package com.wxy.controller;

import java.util.ArrayList;

import java.util.List;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSON;
import com.wxy.dao.DaoUser;
import com.wxy.pojo.User;

@Controller
public class UserController {
	
		@RequestMapping(value = "/list" ,produces ="application/json;charset=UTF-8")	
		@ResponseBody
		public  String  login(){	

		
			User userinfo=DaoUser.select(2);
			
			String json = JSON.toJSONString(userinfo, true).toString();
			return json;  
	    }
		
	}
